CC=gcc
CFLAGS=-Wall -pedantic -Werror -g
BIN=snake_server.exe

sys=system
main_sys=../system

OBJ=$(sys)/sgame.o $(sys)/sinet.o $(main_sys)/proc.o $(sys)/linklist.o server.o

all: server

server.o: server.c
	$(CC) $(CFLAGS) -c -o $@ $<

server: server.o
	make -C $(sys)
	$(CC) $(CFLAGS) -lncurses -o $(BIN) $(OBJ)

clean:
	make -C $(sys) clean
	rm -rf *.o *.exe
